﻿@page "/elephantdetails/{Name}"

<ContentPage>
    <ScrollView>
        <StackLayout>
            <Label Text="@Elephant.Name"></Label>
            <Label Text="@Elephant.Location"></Label>
            <Image Source="@Elephant.ImageUrl"></Image>
            <Label Text="@Elephant.Details"></Label>
        </StackLayout>
    </ScrollView>
</ContentPage>
@code {
    Animal Elephant;

    [Parameter]
    public string Name
    {
        set
        {
            Elephant = ElephantData.Elephants.FirstOrDefault(m => m.Name == Uri.UnescapeDataString(value));
        }
    }
}
